DISCUSSION
The
ATSUFontCount function only counts the number of fonts that are compatible with ATSUI. Fonts that are incompatible with ATSUI include fonts that cannot be used to represent Unicode, the last resort font, and fonts whose names begin with a period or a percent sign. You can use this count to determine the amount of memory to allocate for the
oFontIDs array in the function
ATSUGetFontIDs.
The number of available fonts may change while your application is running. Although fonts cannot be removed from the Fonts folder while an application other than the Finder is running, they can be removed from other locations, resulting in a decrease in the font number. It is possible for a font to be added and another removed between two successive calls of
ATSUFontCount, leaving the total number unchanged.